package com.xuzhiguang.baidu.pan.sdk.token;

import com.xuzhiguang.baidu.pan.sdk.exception.BaiduPanSdkException;

/**
 * @author xuzhiguang
 * @date 2020/6/25 23:30
 */
public interface ITokenStorage {

    /**
     * 保存token
     * @param apiKey
     * @param accessToken
     */
    void save(String apiKey, AccessToken accessToken) throws BaiduPanSdkException;

    /**
     * 获取token
     * @param apiKey
     * @return
     */
    AccessToken get(String apiKey) throws BaiduPanSdkException;

    /**
     * 删除token
     * @param apiKey
     */
    void delete(String apiKey);



}
